package com.docker.manege.server;

import com.docker.core.mvc.dao.BaseDao;
import com.jfinal.kit.Okv;
import com.jfinal.plugin.activerecord.Record;

import java.util.List;

/**
 * @Author ldl
 * @Create 2020/12/02 002 14:54
 */
public class DockerServerDao extends BaseDao {

    @Override
    protected String getSqlTplNameSpace() {
        return "docker.server.info";
    }

    public boolean save(Record docker) {
        return save("docker_server_info", "server_id", docker);
    }

    public Record info(String serverId) {
        return info("docker_server_info", "server_id", serverId);
    }

    public boolean update(Record docker) {
        return update("docker_server_info", "server_id", docker);
    }

    public Record detail(String severId) {
        return tplInfo("detail", severId);
    }

    public List<Record> look(Okv cond) {
        return tplSPList("look", cond);
    }

}
